/**
 * Project Name:springbootDemoProject
 * File Name:MyBatisConfiguration.java
 * Package Name:com.java.util
 * Date:2018年6月18日下午7:17:39
 * Copyright (c) 2018, bluemobi All Rights Reserved.
 */

package com.sc.until;

import java.util.Properties;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.github.pagehelper.PageHelper;

/**
 * Description: <br/>
 * Date: 2018年6月18日 下午7:17:39 <br/>
 * 
 * @author pengchengwang
 * @version
 * @see
 */
@Configuration
public class MyBatisConfiguration {// 向spring中注入
    
    @Bean
    public PageHelper pageHelper() {//组件
        System.out.println("MyBatisConfiguration.pageHelper()");
        PageHelper pageHelper = new PageHelper();
        Properties p = new Properties();
        p.setProperty("offsetAsPageNum", "true");
        p.setProperty("rowBoundsWithCount", "true");
        p.setProperty("reasonable", "true");
        pageHelper.setProperties(p);
        return pageHelper;
    }

}
